Merge branch 'master' of ssh://xp-dev.com/RRRRHHHH_Code
[RRRRHHHH_Code] / ruralHouses client / src / gui / listOfOffers.java
index 4651ff8..7d61def 100644 (file)
@@ -20,6 +20,7 @@ import javax.swing.table.DefaultTableModel;
 
 import domain.Offer;
 import domain.Owner;
+import domain.RuralHouse;
 
 public class listOfOffers extends JFrame {
 
@@ -54,8 +55,10 @@ public class listOfOffers extends JFrame {
                contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
                setContentPane(contentPane);
                contentPane.setLayout(null);
-
-               this.offers = this.owner.getAllOffers();
+               this.offers = new Vector<Offer>();
+               for (RuralHouse rh: this.owner.getRuralHouses()){
+                       this.offers.addAll(rh.getAllOffers());
+               }
                JLabel lblNewLabel = new JLabel();
                lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 27));
                lblNewLabel.setBounds(23, 41, 536, 33);